package com.canal.admin.transfer.req.data;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * @author yangbo
 * @date 2020-07-15 16:34
 */
@Getter
@Setter
public class RtDataDetailConditions {

    @NotNull(message = "渠道商id不能为空")
    private Long channelId;

    @NotNull(message = "渠道号id不能为空")
    private Long itemId;

    @NotNull(message = "ip不能为空")
    private String ip;

    private Integer pageNo;

    private Integer pageSize;

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        pageNo = pageNo == null || pageNo < 0 ? 1 : pageNo;
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        pageSize = pageSize == null || pageSize < 0 ? 1 : pageSize;
        this.pageSize = pageSize;
    }
}
